xm-test: ramdisk fs type is changed to ext3 if needed
authorKeir Fraser <keir.fraser@citrix.com>
Sun, 2 Aug 2009 11:23:46 +0000 (12:23 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Sun, 2 Aug 2009 11:23:46 +0000 (12:23 +0100)
This (one line) patch changes the type of the xm-test initrd from ext2
to ext3 when needed.  It first checks, if ext2 support is missing and
ext3 support is available.  If so the fs type is changed to ext3.

Signed-off-by: Andreas Florath <xen@flonatel.org>
tools/xm-test/ramdisk/Makefile.am

index 4a4c7e65cf4c0f43ebfe6097a7607d3b037b648a..8386218ff39167341baa912934018e27074e3092 100644 (file)
@@ -106,6 +106,15 @@ existing:
                echo Error, $(XMTEST_VER_IMG) not found;  \
                false; \
        fi
+# The newer linux kernels have ext2 disabled by default - but the
+# initrd is ext2.
+# The whole xm-test environment assumes, that the guest system uses
+# the same kernel as the dom0.  Therefore the current (dom0's) kernel
+# is checked if ext2 is supported.  If not (and ext3 is supported) the
+# initrd will be converted to ext3.
+       @cat /proc/filesystems | grep -q ext2 && \
+         cat /proc/filesystems | grep -q ext3 || \
+         /sbin/tune2fs -j $(XMTEST_DL_IMG) >/dev/null || true
 
 clean-local: am_config_clean-local